openoufandomcom-20200214-history
BlueJ
BlueJ is an integrated development environment for Java, focused on teaching. To use it, you have to install the Java 5 JDK, unless you did that already. Linux First you have to get the right version of BlueJ. It's 205, as of writing this. Luckily, you can (after a little investigation) find all older versions of BlueJ on their website: Download version 205 here. In case you need a different version, go here and choose a jar file. Open up a console, go to where you downloaded BlueJ and type java -jar bluej-205.jar The installation wizard should be self explanatory, follow it. Now get the OU DVD containing BlueJ and mount it. There is a directory named "applicationLibraries" (or similar) on it. Copy those to where you installed BlueJ, in the subfolder "lib". BlueJ is ready to rumble. Open up one of the course projects. Works. If the editor doesn't open up for you, launch the setup on the DVD with wine. Install BlueJ (and ONLY BlueJ) and copy everything from the new program folder to your Linux installation. If you would like to have a Desktop Entry for BlueJ, create one named bluej.desktop with the following content (alter the paths): Entry Name=BlueJ Exec=/files/software/BlueJ/bluej Icon=/files/software/BlueJ/lib/images/bluej-icon.gif Terminal=false Type=Application StartupNotify=true Categories=Development;Java In M255, there is another required piece of software: OUWorkspace They ship a Windows Link File containing the correct classpath. We're not on Windows, so we have to write a small shellscript for this. Copy the following into a file name OUWorkspace.sh: #!/bin/bash # # simple shellscript to execute the OUWorkspace # Felix Dahlke, 2008 # BLUEJ_PATH="/files/software/linux/BlueJ" CLASSPATH="\ ${BLUEJ_PATH}/lib/antlr.jar:\ ${BLUEJ_PATH}/lib/bluejcore.jar:\ ${BLUEJ_PATH}/lib/bluejeditor.jar:\ ${BLUEJ_PATH}/lib/bluejext.jar:\ ${BLUEJ_PATH}/lib/bluej.jar:\ ${BLUEJ_PATH}/lib/bsh-2.0b4.jar:\ ${BLUEJ_PATH}/lib/eaextension.jar:\ ${BLUEJ_PATH}/lib/junit.jar:\ ${BLUEJ_PATH}/lib/MRJ141Stubs.jar:\ ${BLUEJ_PATH}/lib/ou.jar:\ ${BLUEJ_PATH}/lib/ouwextension.jar:\ $(pwd)/+libs/*.jar:\ ." java -classpath "$CLASSPATH" ou.bsh.OUWorkspace Change the BLUEJ_PATH variable to point to your BlueJ installation and save the file. Don't forget to make it executable: chmod +x OUWorkspace.sh Put this script into _every_ OU BlueJ project folder, OUWorkspace is the way to actually test your classes. Open up a terminal and go to a project folder containing OUWorkspace.sh. Type: ./OUWorkspace.sh And use the Workspace as usual. Ignore a Nullpointer Exception on startup, if it occurs for you. Mac Copied from http://blog.obsidianproject.co.uk/2008/08/bluej-mac-osx-and-open-university.html You must download bluej 2.0.5 for mac from here http://www.bluej.org/download/download-old.html I suggest installing it in a folder of it's own to avoid annoying errors when using the OUWorkspace then follow the instructions below. The instructions are as follows 1. Right click, or control click if you have a single button mouse on the BlueJ icon. Select the option “Show Package Contents” this will open a window with a folder named “Contents”. 2. Navigate to the userlib folder Contents > Resources > Java > userlib. 3. Pop in the Course software CD, at the root of the CD is a folder named “libraryfiles” go inside here and copy the files “bsh-2.0b4.jar” and “ou.jar” to the userlib folder opened in the last step. 4. Next navigate to the folder Contents > Resources > Java > extensions. 5. From the root of the course CD copy the jars “eaextension.jar” and “ouwextension.jar”. 6. In the finder navigate to the folder named Library in the root of your hard drive and scroll down to the folder Java, copy the same two jars “bsh-2.0b4.jar” and “ou.jar” to the folder named “Extensions”. Quick listing: Inside BlueJ application bundle: Resources > Java > Extensions should contain the following: eaextension.jar ouwextension.jar Inside BlueJ application bundle: Resources > Java > userlib should contain bsh-2.0b4.jar ou.jar In the Library Folder in the Hard Drive and not in your home folder. /Library/Java/Extensions should contain the following: bsh-2.0b4.jar ou.jar Category:Applications